const KEY = 'my-usertoken-likede'
const UNAME = 'my-username-likede'
const ID = 'my-userid-likede'

// 直接用按需导出，可以导出多个
// 但是按需导出，导入时必须 import { getToken } from '模块名导入'

// token获取
export const getToken = () => {
  return localStorage.getItem(KEY)
}
// 设置
export const setToken = (newToken) => {
  localStorage.setItem(KEY, newToken)
}
// 删除
export const delToken = () => {
  localStorage.removeItem(KEY)
}

// 用户名
export const getUserName = () => {
  return localStorage.getItem(UNAME)
}
export const setUserName = (newUserNam) => {
  localStorage.setItem(UNAME, newUserNam)
}
export const delUserName = () => {
  localStorage.removeItem(UNAME)
}
// 用户ID
export const setUserId = (newUserid) => {
  localStorage.setItem(ID, newUserid)
}
export const getUserId = () => {
  return localStorage.getItem(ID)
}
